<?php
namespace laiq\base;

use laiq\db\Sql;

class Model extends Sql
{
    protected $model;

    public function __contruct() {
        if (!$this->table) {
            $this->model = get_class($this);

             // 删除类名最后的 Model 字符
             $this->model = substr($this->model, 0, -5);
             
            // 数据库表名与类名一致
            $this->table = strtolower($this->model);
        }   
    }
}